{extend name="pub/base" /}
{block name="title"}
<title>路由管理</title>
{/block}

{block name="body"}
<div class="Hui-admin-article">
    <nav class="breadcrumb" style="background-color:#fff;padding: 0 24px">
        首页
        <span class="c-gray en">/</span>
        路由管理
        <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
           href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
    </nav>
    <div class="Hui-article">
        <form action="{:url('routeconfig')}" method="post" class="form form-horizontal" enctype="multipart/form-data">
            <div class="row clearfix">
                <label class="form-label col-xs-4 col-sm-3">配置代码：</label>
                <div class="formControls col-xs-8 col-sm-9">
                    <textarea name="json" cols="" rows="20" class="textarea" dragonfly="true">{$json}</textarea>
                </div>
            </div>

            <div class="row cl">
                <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                    <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
                </div>
            </div>
        </form>
    </div>
</div>
<script>
    $(function(){
        /* 表单验证，提交 */
        $("form").validate({
            rules: {
                json: {
                    required:true,
                }
            },
            onkeyup: false,
            focusCleanup: false,
            submitHandler: function(form) {
                $.ajax({
                    url:"{:url('routeconfig')}",
                    type:'post',
                    data:$('form').serialize(),
                    success(res) {
                        subResHandle(res)
                    }
                })
            }
        });
    });
</script>
<!--/请在上方写此页面业务相关的脚本-->
{/block}